import 'package:factoryside/bean/finances_json_entity.dart';

financesJsonEntityFromJson(FinancesJsonEntity data, Map<String, dynamic> json) {
	if (json['page'] != null) {
		data.page = json['page'] is String
				? int.tryParse(json['page'])
				: json['page'].toInt();
	}
	if (json['limit'] != null) {
		data.limit = json['limit'] is String
				? int.tryParse(json['limit'])
				: json['limit'].toInt();
	}
	if (json['UserID'] != null) {
		data.userID = json['UserID'].toString();
	}
	if (json['State'] != null) {
		data.state = json['State'].toString();
	}
	if (json['TypeID'] != null) {
		data.typeID = json['TypeID'].toString();
	}
	if (json['OrderNumber'] != null) {
		data.orderNumber = json['OrderNumber'].toString();
	}
	if (json['ProvinceCode'] != null) {
		data.provinceCode = json['ProvinceCode'].toString();
	}
	if (json['CityCode'] != null) {
		data.cityCode = json['CityCode'].toString();
	}
	if (json['AreaCode'] != null) {
		data.areaCode = json['AreaCode'].toString();
	}
	if (json['DistrictCode'] != null) {
		data.districtCode = json['DistrictCode'].toString();
	}
	if (json['StartTime'] != null) {
		data.startTime = json['StartTime'].toString();
	}
	if (json['EndTime'] != null) {
		data.endTime = json['EndTime'].toString();
	}
	if (json['Guarantee'] != null) {
		data.guarantee = json['Guarantee'].toString();
	}
	return data;
}

Map<String, dynamic> financesJsonEntityToJson(FinancesJsonEntity entity) {
	final Map<String, dynamic> data = new Map<String, dynamic>();
	data['page'] = entity.page;
	data['limit'] = entity.limit;
	data['UserID'] = entity.userID;
	data['State'] = entity.state;
	data['TypeID'] = entity.typeID;
	data['OrderNumber'] = entity.orderNumber;
	data['ProvinceCode'] = entity.provinceCode;
	data['CityCode'] = entity.cityCode;
	data['AreaCode'] = entity.areaCode;
	data['DistrictCode'] = entity.districtCode;
	data['StartTime'] = entity.startTime;
	data['EndTime'] = entity.endTime;
	data['Guarantee'] = entity.guarantee;
	return data;
}